home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 4 / Gold Medal Software - Volume 4 (Gold Medal) (1994).iso / os2 / fbar14.arj / REXXSAA.H < prev    next >
C/C++ Source or Header  |  1994-01-21  |  31KB  |  810 lines

  1. /*********************************************************************\
  2. *
  3. * Module Name: REXXSAA.H
  4. *
  5. * REXX Common Definitions File
  6. *
  7. * @Copyright  1989, 1991 IBM Corporation
  8. * Licensed Materials - Property of IBM
  9. *
  10. * Modified for use with Borland C++
  11. *
  12. * *********************************************************************
  13. *
  14. *   #define:              To include:
  15. *
  16. *   INCL_REXXSAA          Complete Rexx support
  17. *   INCL_RXSUBCOM         Rexx subcommand handler support
  18. *   INCL_RXSHV            Rexx shared variable pool support
  19. *   INCL_RXFUNC           Rexx external function support
  20. *   INCL_RXSYSEXIT        Rexx system exit support
  21. *   INCL_RXMACRO          Rexx macro space support
  22. *   INCL_RXARI            Rexx asynchronous Trace/Halt support
  23. *
  24. \*********************************************************************/
  25. #ifndef REXXSAA_INCLUDED
  26. #define REXXSAA_INCLUDED
  27.  
  28. /* XLATON */
  29.  
  30. #ifndef OS2_INCLUDED
  31. #include <os2.h>
  32. #endif
  33.  
  34. /*********************************************************************/
  35. /*                                                                   */
  36. /*                            Common                                 */
  37. /*                                                                   */
  38. /*********************************************************************/
  39.  
  40. /* This section defines return codes and constants that are the      */
  41. /* same for both 16-bit and 32-bit REXX calls.                       */
  42.  
  43. #ifdef INCL_REXXSAA
  44. #define INCL_RXSUBCOM
  45. #define INCL_RXSHV
  46. #define INCL_RXFUNC
  47. #define INCL_RXSYSEXIT
  48. #define INCL_RXMACRO
  49. #define INCL_RXARI
  50. #endif /* INCL_REXXSAA */
  51.  
  52.  
  53. /***    Structure for external interface string (RXSTRING) */
  54.  
  55. typedef struct _RXSTRING {          /* rxstr */
  56.         ULONG  strlength;           /*   length of string         */
  57.         PCH    strptr;              /*   pointer to string        */
  58. }  RXSTRING;
  59.  
  60. typedef RXSTRING     *PRXSTRING;       /* pointer to a RXSTRING      */
  61.  
  62. #define RXAUTOBUFLEN         256L
  63.  
  64.  
  65. /***    Structure for system exit block (RXSYSEXIT) 32-bit */
  66.  
  67. typedef struct _RXSYSEXIT {            /* syse */
  68.    PSZ   sysexit_name;                 /* subcom enviro for sysexit  */
  69.    LONG  sysexit_code;                 /* sysexit function code      */
  70. }  RXSYSEXIT;
  71.  
  72. typedef RXSYSEXIT *PRXSYSEXIT;         /* pointer to a RXSYSEXIT     */
  73.  
  74.  
  75. /* XLATOFF */
  76. /***    Macros for RXSTRING manipulation                   */
  77.  
  78. #define RXNULLSTRING(r)      (!(r).strptr)
  79. #define RXZEROLENSTRING(r)   ((r).strptr && !(r).strlength)
  80. #define RXVALIDSTRING(r)     ((r).strptr && (r).strlength)
  81. #define RXSTRLEN(r)          (RXNULLSTRING(r)?0L:(r).strlength)
  82. #define RXSTRPTR(r)          (r).strptr
  83. #define MAKERXSTRING(r,p,l)  {(r).strptr=(PCH)p;(r).strlength=(ULONG)l;}
  84.  
  85. /* XLATON */
  86.  
  87. /*** Call type codes for use on interpreter startup                  */
  88. #define RXCOMMAND       0              /* Program called as Command  */
  89. #define RXSUBROUTINE    1              /* Program called as Subroutin*/
  90. #define RXFUNCTION      2              /* Program called as Function */
  91.  
  92. /***    Subcommand Interface defines*/
  93. #ifdef INCL_RXSUBCOM
  94.  
  95.  
  96. /***    Drop Authority for RXSUBCOM interface */
  97.  
  98. #define RXSUBCOM_DROPPABLE   0x00     /* handler to be dropped by all*/
  99. #define RXSUBCOM_NONDROP     0x01     /* process with same PID as the*/
  100.                                       /* registrant may drop environ */
  101.  
  102. /***    Return Codes from RXSUBCOM interface */
  103.  
  104. #define RXSUBCOM_ISREG       0x01     /* Subcommand is registered    */
  105. #define RXSUBCOM_ERROR       0x01     /* Subcommand Ended in Error   */
  106. #define RXSUBCOM_FAILURE     0x02     /* Subcommand Ended in Failure */
  107. #define RXSUBCOM_BADENTRY    1001     /* Invalid Entry Conditions    */
  108. #define RXSUBCOM_NOEMEM      1002     /* Insuff stor to complete req */
  109. #define RXSUBCOM_BADTYPE     1003     /* Bad registration type.      */
  110. #define RXSUBCOM_NOTINIT     1004     /* API system not initialized. */
  111. #define RXSUBCOM_OK           0       /* Function Complete           */
  112. #define RXSUBCOM_DUP         10       /* Duplicate Environment Name- */
  113.                                       /* but Registration Completed  */
  114. #define RXSUBCOM_MAXREG      20       /* Cannot register more        */
  115.                                       /* handlers                    */
  116. #define RXSUBCOM_NOTREG      30       /* Name Not Registered         */
  117. #define RXSUBCOM_NOCANDROP   40       /* Name not droppable          */
  118. #define RXSUBCOM_LOADERR     50       /* Could not load function     */
  119. #define RXSUBCOM_NOPROC     127       /* RXSUBCOM routine - not found*/
  120.  
  121. #endif /* INCL_RXSUBCOM for defines */
  122.  
  123. /***    Shared Variable Pool Interface defines */
  124. #ifdef INCL_RXSHV
  125.  
  126. /***    Function Codes for Variable Pool Interface (shvcode) */
  127.  
  128. #define RXSHV_SET          0x00       /* Set var from given value    */
  129. #define RXSHV_FETCH        0x01       /* Copy value of var to buffer */
  130. #define RXSHV_DROPV        0x02       /* Drop variable               */
  131. #define RXSHV_SYSET        0x03       /* Symbolic name Set variable  */
  132. #define RXSHV_SYFET        0x04       /* Symbolic name Fetch variable*/
  133. #define RXSHV_SYDRO        0x05       /* Symbolic name Drop variable */
  134. #define RXSHV_NEXTV        0x06       /* Fetch "next" variable       */
  135. #define RXSHV_PRIV         0x07       /* Fetch private information   */
  136. #define RXSHV_EXIT         0x08       /* Set function exit value     */
  137.  
  138. /***    Return Codes for Variable Pool Interface */
  139.  
  140. #define RXSHV_NOAVL         144       /* Interface not available     */
  141.  
  142. /***    Return Code Flags for Variable Pool Interface (shvret) */
  143.  
  144. #define RXSHV_OK           0x00       /* Execution was OK            */
  145. #define RXSHV_NEWV         0x01       /* Variable did not exist      */
  146. #define RXSHV_LVAR         0x02       /* Last var trans via SHVNEXTV */
  147. #define RXSHV_TRUNC        0x04       /* Truncation occurred-Fetch   */
  148. #define RXSHV_BADN         0x08       /* Invalid variable name       */
  149. #define RXSHV_MEMFL        0x10       /* Out of memory failure       */
  150. #define RXSHV_BADF         0x80       /* Invalid funct code (shvcode)*/
  151.  
  152.  
  153. /***    Structure of Shared Variable Request Block (SHVBLOCK) */
  154.  
  155. typedef struct _SHVBLOCK {            /* shvb */
  156.     struct _SHVBLOCK  *shvnext;       /* pointer to the next block   */
  157.     RXSTRING           shvname;       /* Pointer to the name buffer  */
  158.     RXSTRING           shvvalue;      /* Pointer to the value buffer */
  159.     ULONG              shvnamelen;    /* Length of the name value    */
  160.     ULONG              shvvaluelen;   /* Length of the fetch value   */
  161.     UCHAR              shvcode;       /* Function code for this block*/
  162.     UCHAR              shvret;        /* Individual Return Code Flags*/
  163. }   SHVBLOCK;
  164.  
  165. typedef SHVBLOCK *PSHVBLOCK;
  166.  
  167. #endif /* INCL_RXSHV for defines */
  168.  
  169. /***    External Function Interface */
  170. #ifdef INCL_RXFUNC
  171.  
  172. /***    Registration Type Identifiers for Available Function Table */
  173.  
  174. #define RXFUNC_DYNALINK       1        /* Function Available in DLL  */
  175. #define RXFUNC_CALLENTRY      2        /* Registered as mem entry pt.*/
  176.  
  177.  
  178. /***    Return Codes from RxFunction interface */
  179.  
  180.  
  181. #define RXFUNC_OK             0        /* REXX-API Call Successful   */
  182. #define RXFUNC_DEFINED       10        /* Function Defined in AFT    */
  183. #define RXFUNC_NOMEM         20        /* Not Enough Mem to Add      */
  184. #define RXFUNC_NOTREG        30        /* Funct Not Registered in AFT*/
  185. #define RXFUNC_MODNOTFND     40        /* Funct Dll Module Not Found */
  186. #define RXFUNC_ENTNOTFND     50        /* Funct Entry Point Not Found*/
  187. #define RXFUNC_NOTINIT       60        /* API not initialized        */
  188. #define RXFUNC_BADTYPE       70        /* Bad function type          */
  189. #endif /* INCL_RXFUNC for defines */
  190.  
  191. /***   System Exits defines */
  192. #ifdef INCL_RXSYSEXIT
  193.  
  194. /***    Drop Authority for Rexx Exit interface */
  195.  
  196. #define RXEXIT_DROPPABLE     0x00     /* handler to be dropped by all*/
  197. #define RXEXIT_NONDROP       0x01     /* process with same PID as the*/
  198.                                       /* registrant may drop environ */
  199.  
  200.  
  201. /***    Exit return actions */
  202.  
  203. #define RXEXIT_HANDLED       0        /* Exit handled exit event     */
  204. #define RXEXIT_NOT_HANDLED   1        /* Exit passes on exit event   */
  205. #define RXEXIT_RAISE_ERROR   (-1)     /* Exit handler error occurred */
  206.  
  207. /***    Return Codes from RXEXIT interface */
  208.  
  209. #define RXEXIT_ISREG         0x01     /* Exit is registered          */
  210. #define RXEXIT_ERROR         0x01     /* Exit Ended in Error         */
  211. #define RXEXIT_FAILURE       0x02     /* Exit Ended in Failure       */
  212. #define RXEXIT_BADENTRY      1001     /* Invalid Entry Conditions    */
  213. #define RXEXIT_NOEMEM        1002     /* Insuff stor to complete req */
  214. #define RXEXIT_BADTYPE       1003     /* Bad registration type.      */
  215. #define RXEXIT_NOTINIT       1004     /* API system not initialized. */
  216. #define RXEXIT_OK             0       /* Function Complete           */
  217. #define RXEXIT_DUP           10       /* Duplicate Exit Name-        */
  218.                                       /* but Registration Completed  */
  219. #define RXEXIT_MAXREG        20       /* Cannot register more        */
  220.                                       /* handlers                    */
  221. #define RXEXIT_NOTREG        30       /* Name Not Registered         */
  222. #define RXEXIT_NOCANDROP     40       /* Name not droppable          */
  223. #define RXEXIT_LOADERR       50       /* Could not load function     */
  224. #define RXEXIT_NOPROC       127       /* RXEXIT routine - not found  */
  225.  
  226.  
  227.  
  228. /* System Exit function and sub-function definitions */
  229.  
  230. #define RXENDLST    0                 /* End of exit list.           */
  231. #define RXFNC    2                    /* Process external functions. */
  232. #define    RXFNCCAL 1                 /* subcode value.              */
  233. #define RXCMD    3                    /* Process host commands.      */
  234. #define    RXCMDHST 1                 /* subcode value.              */
  235. #define RXMSQ    4                    /* Manipulate queue.           */
  236. #define    RXMSQPLL 1                 /* Pull a line from queue      */
  237. #define    RXMSQPSH 2                 /* Place a line on queue       */
  238. #define    RXMSQSIZ 3                 /* Return num of lines on queue*/
  239. #define    RXMSQNAM 20                /* Set active queue name       */
  240. #define RXSIO    5                    /* Session I/O.                */
  241. #define    RXSIOSAY 1                 /* SAY a line to STDOUT        */
  242. #define    RXSIOTRC 2                 /* Trace output                */
  243. #define    RXSIOTRD 3                 /* Read from char stream       */
  244. #define    RXSIODTR 4                 /* DEBUG read from char stream */
  245. #define    RXSIOTLL 5                 /* Return linelength(N/A OS/2) */
  246. #define RXHLT    7                    /* Halt processing.            */
  247. #define    RXHLTCLR 1                 /* Clear HALT indicator        */
  248. #define    RXHLTTST 2                 /* Test HALT indicator         */
  249. #define RXTRC    8                    /* Test ext trace indicator.   */
  250. #define    RXTRCTST 1                 /* subcode value.              */
  251. #define RXINI    9                    /* Initialization processing.  */
  252. #define    RXINIEXT 1                 /* subcode value.              */
  253. #define RXTER   10                    /* Termination processing.     */
  254. #define    RXTEREXT 1                 /* subcode value.              */
  255. #define RXNOOFEXITS 11                /* 1 + largest exit number.    */
  256.  
  257. typedef PUCHAR PEXIT;                 /* ptr to exit parameter block */
  258. #endif /* INCL_RXSYSEXIT for defines */
  259.  
  260. /***    Asynchronous Request Interface defines */
  261. #ifdef INCL_RXARI
  262.  
  263. /***    Return Codes from Asynchronous Request interface */
  264.  
  265. #define RXARI_OK                   0  /* Interface completed         */
  266. #define RXARI_NOT_FOUND            1  /* Target program not found    */
  267. #define RXARI_PROCESSING_ERROR     2  /* Error processing request    */
  268. #endif /* INCL_RXARI for defines */
  269.  
  270. /***    Macro Space Interface defines */
  271. #ifdef INCL_RXMACRO
  272.  
  273. /***    Registration Search Order Flags */
  274.  
  275. #define RXMACRO_SEARCH_BEFORE       1  /* Beginning of search order  */
  276. #define RXMACRO_SEARCH_AFTER        2  /* End of search order        */
  277.  
  278.  
  279. /***    Return Codes from RxMacroSpace interface */
  280.  
  281. #define RXMACRO_OK                 0  /* Macro interface completed   */
  282. #define RXMACRO_NO_STORAGE         1  /* Not Enough Storage Available*/
  283. #define RXMACRO_NOT_FOUND          2  /* Requested function not found*/
  284. #define RXMACRO_EXTENSION_REQUIRED 3  /* File ext required for save  */
  285. #define RXMACRO_ALREADY_EXISTS     4  /* Macro functions exist       */
  286. #define RXMACRO_FILE_ERROR         5  /* File I/O error in save/load */
  287. #define RXMACRO_SIGNATURE_ERROR    6  /* Incorrect format for load   */
  288. #define RXMACRO_SOURCE_NOT_FOUND   7  /* Requested cannot be found   */
  289. #define RXMACRO_INVALID_POSITION   8  /* Invalid search order pos    */
  290. #define RXMACRO_NOT_INIT           9  /* API not initialized         */
  291. #endif /* INCL_RXMACRO for defines */
  292.  
  293. /*********************************************************************/
  294. /*                                                                   */
  295. /*                            32-bit                                 */
  296. /*                                                                   */
  297. /*********************************************************************/
  298.  
  299. /* XLATOFF */
  300. /***    Main Entry Point to the REXXSAA Interpreter */
  301.  
  302.  
  303. /*********************************************************************/
  304. /* #pragma linkage(RexxStart,system) */
  305. /*********************************************************************/
  306. typedef LONG APIENTRY RexxStart (
  307.          LONG,                         /* Num of args passed to rexx */
  308.          PRXSTRING,                    /* Array of args passed to rex*/
  309.          PSZ,                          /* [d:][path] filename[.ext]  */
  310.          PRXSTRING,                    /* Loc of rexx proc in memory */
  311.          PSZ,                          /* ASCIIZ initial environment.*/
  312.          LONG ,                        /* type (command,subrtn,funct)*/
  313.          PRXSYSEXIT,                   /* SysExit env. names &  codes*/
  314.          PSHORT,                       /* Ret code from if numeric   */
  315.          PRXSTRING );                  /* Retvalue from the rexx proc*/
  316. /*********************************************************************/
  317.  
  318. /***   Uppercase Entry Point Name */
  319. #define REXXSTART   RexxStart
  320.  
  321. /* XLATON */
  322.  
  323. /***    Subcommand Interface */
  324. #ifdef INCL_RXSUBCOM
  325.  
  326.  
  327. /* XLATOFF */
  328.  
  329. /* This typedef simplifies coding of a Subcommand handler.           */
  330. #pragma linkage(RexxSubcomHandler,system)
  331. typedef ULONG RexxSubcomHandler(PRXSTRING,
  332.                                 PUSHORT,
  333.                                 PRXSTRING);
  334.  
  335. /***   RexxRegisterSubcomDll -- Register a DLL entry point           */
  336. /***   as a Subcommand handler */
  337.  
  338. #pragma linkage(RexxRegisterSubcomDll,system)
  339. APIRET APIENTRY RexxRegisterSubcomDll (
  340.          PSZ,                          /* Name of subcom handler     */
  341.          PSZ,                          /* Name of DLL                */
  342.          PSZ,                          /* Name of procedure in DLL   */
  343.          PUCHAR,                       /* User area                  */
  344.          ULONG  );                     /* Drop authority.            */
  345.  
  346. /***   Uppercase Entry Point Name */
  347. #define REXXREGISTERSUBCOMDLL  RexxRegisterSubcomDll
  348.  
  349.  
  350. /***   RexxRegisterSubcomExe -- Register an EXE entry point          */
  351. /***   as a Subcommand handler */
  352.  
  353. #pragma linkage(RexxRegisterSubcomExe,system)
  354. APIRET APIENTRY RexxRegisterSubcomExe (
  355.          PSZ,                          /* Name of subcom handler     */
  356.          PFN,                          /* address of handler in EXE  */
  357.          PUCHAR);                      /* User area                  */
  358.  
  359. /***   Uppercase Entry Point Name */
  360. #define REXXREGISTERSUBCOMEXE  RexxRegisterSubcomExe
  361.  
  362.  
  363.  
  364. /***    RexxQuerySubcom - Query an environment for Existance */
  365.  
  366. #pragma linkage(RexxQuerySubcom,system)
  367. APIRET APIENTRY RexxQuerySubcom(
  368.          PSZ,                          /* Name of the Environment    */
  369.          PSZ,                          /* DLL Module Name            */
  370.          PUSHORT,                      /* Stor for existance code    */
  371.          PUCHAR );                     /* Stor for user word         */
  372.  
  373. /***   Uppercase Entry Point Name */
  374. #define REXXQUERYSUBCOM  RexxQuerySubcom
  375.  
  376.  
  377.  
  378. /***    RexxDeregisterSubcom - Drop registration of a Subcommand     */
  379. /***    environment */
  380.  
  381. #pragma linkage(RexxDeregisterSubcom,system)
  382. APIRET APIENTRY RexxDeregisterSubcom(
  383.          PSZ,                          /* Name of the Environment    */
  384.          PSZ );                        /* DLL Module Name            */
  385.  
  386. /***   Uppercase Entry Point Name */
  387. #define REXXDEREGISTERSUBCOM  RexxDeregisterSubcom
  388.  
  389.  
  390. /* XLATON */
  391. #endif /* INCL_RXSUBCOM */
  392.  
  393.  
  394.  
  395. /***    Shared Variable Pool Interface */
  396. #ifdef INCL_RXSHV
  397.  
  398. /* XLATOFF */
  399.  
  400. /***    RexxVariablePool - Request Variable Pool Service */
  401.  
  402. #pragma linkage(RexxVariablePool,system)
  403. APIRET APIENTRY RexxVariablePool(
  404.          PSHVBLOCK);                  /* Pointer to list of SHVBLOCKs*/
  405.  
  406. /***   Uppercase Entry Point Name */
  407. #define REXXVARIABLEPOOL  RexxVariablePool
  408. /* XLATON */
  409.  
  410.  
  411. #endif /* INCL_RXSHV */
  412.  
  413.  
  414. /***    External Function Interface */
  415. #ifdef INCL_RXFUNC
  416.  
  417. /* XLATOFF */
  418.  
  419. /* This typedef simplifies coding of an External Function.           */
  420. #pragma linkage(RexxFunctionHandler,system)
  421. typedef ULONG RexxFunctionHandler(PUCHAR,
  422.                                   ULONG,
  423.                                   PRXSTRING,
  424.                                   PSZ,
  425.                                   PRXSTRING);
  426.  
  427. /***    RexxRegisterFunctionDll - Register a function in the AFT */
  428.  
  429. #pragma linkage(RexxRegisterFunctionDll,system)
  430. APIRET APIENTRY RexxRegisterFunctionDll (
  431.         PSZ,                           /* Name of function to add    */
  432.         PSZ,                           /* Dll file name (if in dll)  */
  433.         PSZ);                          /* Entry in dll               */
  434.  
  435. /***   Uppercase Entry Point Name */
  436. #define REXXREGISTERFUNCTIONDLL  RexxRegisterFunctionDll
  437.  
  438.  
  439. /***    RexxRegisterFunctionExe - Register a function in the AFT */
  440.  
  441. #pragma linkage(RexxRegisterFunctionExe,system)
  442. APIRET APIENTRY RexxRegisterFunctionExe (
  443.         PSZ,                           /* Name of function to add    */
  444.         PFN);                          /* Entry point in EXE         */
  445.  
  446. /***   Uppercase Entry Point Name */
  447. #define REXXREGISTERFUNCTIONEXE  RexxRegisterFunctionExe
  448.  
  449.  
  450.  
  451. /***    RexxDeregisterFunction - Delete a function from the AFT */
  452.  
  453. #pragma linkage(RexxDeregisterFunction,system)
  454. APIRET APIENTRY RexxDeregisterFunction (
  455.         PSZ );                         /* Name of function to remove */
  456.  
  457. /***   Uppercase Entry Point Name */
  458. #define REXXDEREGISTERFUNCTION  RexxDeregisterFunction
  459.  
  460.  
  461.  
  462. /***    RexxQueryFunction - Scan the AFT for a function */
  463.  
  464. #pragma linkage(RexxQueryFunction,system)
  465. APIRET APIENTRY RexxQueryFunction (
  466.         PSZ );                         /* Name of function to find   */
  467.  
  468. /***   Uppercase Entry Point Name */
  469. #define REXXQUERYFUNCTION  RexxQueryFunction
  470.  
  471.  
  472.  
  473. /* XLATON */
  474.  
  475.  
  476. #endif /* INCL_RXFUNC */
  477.  
  478.  
  479. /***   System Exits */
  480. #ifdef INCL_RXSYSEXIT
  481.  
  482. /***    Subfunction RXFNCCAL - External Function Calls */
  483.  
  484. #pragma pack(1)
  485.  
  486. typedef struct _RXFNC_FLAGS {          /* fl */
  487.    unsigned rxfferr  : 1;              /* Invalid call to routine.   */
  488.    unsigned rxffnfnd : 1;              /* Function not found.        */
  489.    unsigned rxffsub  : 1;              /* Called as a subroutine     */
  490. }  RXFNC_FLAGS ;
  491.  
  492. typedef struct _RXFNCCAL_PARM {        /* fnc */
  493.    RXFNC_FLAGS       rxfnc_flags ;     /* function flags             */
  494.    PUCHAR            rxfnc_name;       /* Pointer to function name.  */
  495.    USHORT            rxfnc_namel;      /* Length of function name.   */
  496.    PUCHAR            rxfnc_que;        /* Current queue name.        */
  497.    USHORT            rxfnc_quel;       /* Length of queue name.      */
  498.    USHORT            rxfnc_argc;       /* Number of args in list.    */
  499.    PRXSTRING         rxfnc_argv;       /* Pointer to argument list.  */
  500.    RXSTRING          rxfnc_retc;       /* Return value.              */
  501. }  RXFNCCAL_PARM;
  502.  
  503.  
  504. /***    Subfunction RXCMDHST -- Process Host Commands     */
  505.  
  506. typedef struct _RXCMD_FLAGS {          /* fl */
  507.    unsigned rxfcfail : 1;              /* Command failed.            */
  508.    unsigned rxfcerr  : 1;              /* Command ERROR occurred.    */
  509. }  RXCMD_FLAGS;
  510.  
  511. typedef struct _RXCMDHST_PARM {        /* rx */
  512.    RXCMD_FLAGS       rxcmd_flags;      /* error/failure flags        */
  513.    PUCHAR            rxcmd_address;    /* Pointer to address name.   */
  514.    USHORT            rxcmd_addressl;   /* Length of address name.    */
  515.    PUCHAR            rxcmd_dll;        /* dll name for command.      */
  516.    USHORT            rxcmd_dll_len;    /* Length of dll name.        */
  517.    RXSTRING          rxcmd_command;    /* The command string.        */
  518.    RXSTRING          rxcmd_retc;       /* Pointer to return buffer   */
  519. }  RXCMDHST_PARM;
  520.  
  521.  
  522. /***     Subfunction RXMSQPLL -- Pull Entry from Queue */
  523.  
  524. typedef struct _RXMSQPLL_PARM {        /* pll */
  525.    RXSTRING          rxmsq_retc;       /* Pointer to dequeued entry  */
  526.                                        /* buffer.  User allocated.   */
  527. } RXMSQPLL_PARM;
  528.  
  529.  
  530. /***    Subfunction RXMSQPSH -- Push Entry on Queue */
  531.  
  532. typedef struct _RXMSQ_FLAGS {          /* fl */
  533.    unsigned rxfmlifo : 1;              /* Stack entry LIFO if set    */
  534. }  RXMSQ_FLAGS;
  535.  
  536. typedef struct _RXMSQPSH_PARM {        /* psh */
  537.    RXMSQ_FLAGS       rxmsq_flags;      /* LIFO/FIFO flag             */
  538.    RXSTRING          rxmsq_value;      /* The entry to be pushed.    */
  539. }  RXMSQPSH_PARM;
  540.  
  541. #pragma pack()
  542.  
  543. /***    Subfunction RXMSQSIZ -- Return the Current Queue Size */
  544.  
  545. typedef struct _RXMSQSIZ_PARM {        /* siz */
  546.    ULONG             rxmsq_size;       /* Number of Lines in Queue   */
  547. }  RXMSQSIZ_PARM;
  548.  
  549.  
  550. /***    Subfunction RXMSQNAM -- Set Current Queue Name */
  551.  
  552. typedef struct _RXMSQNAM_PARM {        /* nam */
  553.    RXSTRING          rxmsq_name;       /* RXSTRING containing        */
  554.                                        /* queue name.                */
  555. }  RXMSQNAM_PARM;
  556.  
  557.  
  558. /***    Subfunction RXSIOSAY -- Perform SAY Clause */
  559.  
  560. typedef struct _RXSIOSAY_PARM {        /* say */
  561.    RXSTRING          rxsio_string;     /* String to display.         */
  562. }  RXSIOSAY_PARM;
  563.  
  564.  
  565. /***    Subfunction RXSIOTRC -- Write Trace Output */
  566.  
  567. typedef struct _RXSIOTRC_PARM { /* trcparm */
  568.    RXSTRING          rxsio_string;     /* Trace line to display.     */
  569. }  RXSIOTRC_PARM;
  570.  
  571.  
  572. /***    Subfunction RXSIOTRD -- Read Input from the Terminal */
  573.  
  574. typedef struct _RXSIOTRD_PARM {        /* trd */
  575.    RXSTRING          rxsiotrd_retc;    /* RXSTRING for output.       */
  576. }  RXSIOTRD_PARM;
  577.  
  578.  
  579. /***    Subfunction RXSIODTR -- Read Debug Input from the Terminal */
  580.  
  581. typedef struct _RXSIODTR_PARM {        /* dtr */
  582.    RXSTRING          rxsiodtr_retc;    /* RXSTRING for output.       */
  583. }  RXSIODTR_PARM;
  584.  
  585.  
  586. /***    Subfunction RXHSTTST -- Test for HALT Condition */
  587.  
  588. typedef struct _RXHLT_FLAGS {          /* fl Halt flag               */
  589.    unsigned rxfhhalt : 1;              /* Set if HALT occurred.      */
  590. }  RXHLT_FLAGS;
  591.  
  592. typedef struct _RXHLTTST_PARM {        /* tst */
  593.    RXHLT_FLAGS rxhlt_flags;            /* Set if HALT occurred       */
  594. }  RXHLTTST_PARM;
  595.  
  596.  
  597. /***    Subfunction RXTRCTST -- Test for TRACE Condition */
  598.  
  599. typedef struct _RXTRC_FLAGS {          /* fl Trace flags             */
  600.    unsigned rxftrace : 1;              /* Set to run external trace. */
  601. }  RXTRC_FLAGS;
  602.  
  603. typedef struct _RXTRCTST_PARM {        /* tst */
  604.    RXTRC_FLAGS rxtrc_flags;            /* Set to run external trace  */
  605. }  RXTRCTST_PARM;
  606.  
  607.  
  608. /* XLATOFF */
  609.  
  610. /* This typedef simplifies coding of an Exit handler.                */
  611. #pragma linkage(RexxExitHandler,system)
  612. typedef LONG RexxExitHandler(LONG,
  613.                              LONG,
  614.                              PEXIT);
  615.  
  616. /***      RexxRegisterExitDll - Register a system exit. */
  617.  
  618. #pragma linkage(RexxRegisterExitDll,system)
  619. APIRET APIENTRY RexxRegisterExitDll (
  620.          PSZ,                          /* Name of the exit handler   */
  621.          PSZ,                          /* Name of the DLL            */
  622.          PSZ,                          /* Name of the procedure      */
  623.          PUCHAR,                       /* User area                  */
  624.          ULONG );                      /* Drop authority             */
  625.  
  626. /***   Uppercase Entry Point Name */
  627. #define REXXREGISTEREXITDLL  RexxRegisterExitDll
  628.  
  629.  
  630. /***      RexxRegisterExitExe - Register a system exit. */
  631.  
  632. #pragma linkage(RexxRegisterExitExe,system)
  633. APIRET APIENTRY RexxRegisterExitExe (
  634.          PSZ,                          /* Name of the exit handler   */
  635.          PFN,                          /* Address of exit handler    */
  636.          PUCHAR);                      /* User area                  */
  637.  
  638. /***   Uppercase Entry Point Name */
  639. #define REXXREGISTEREXITEXE  RexxRegisterExitExe
  640.  
  641.  
  642.  
  643. /***    RexxDeregisterExit - Drop registration of a system exit. */
  644.  
  645. #pragma linkage(RexxDeregisterExit,system)
  646. APIRET APIENTRY RexxDeregisterExit (
  647.          PSZ,                          /* Exit name                  */
  648.          PSZ ) ;                       /* DLL module name            */
  649.  
  650. /***   Uppercase Entry Point Name */
  651. #define REXXDEREGISTEREXIT  RexxDeregisterExit
  652.  
  653.  
  654.  
  655. /***    RexxQueryExit - Query an exit for existance. */
  656.  
  657. #pragma linkage(RexxQueryExit,system)
  658. APIRET APIENTRY RexxQueryExit (
  659.          PSZ,                          /* Exit name                  */
  660.          PSZ,                          /* DLL Module name.           */
  661.          PUSHORT,                      /* Existance flag.            */
  662.          PUCHAR );                     /* User data.                 */
  663.  
  664. /***   Uppercase Entry Point Name */
  665. #define REXXQUERYEXIT  RexxQueryExit
  666. /* XLATON */
  667.  
  668.  
  669. #endif /* INCL_RXSYSEXIT */
  670.  
  671.  
  672. /***    Asynchronous Request Interface */
  673. #ifdef INCL_RXARI
  674.  
  675. /* XLATOFF */
  676.  
  677. /***    RexxSetHalt - Request Program Halt */
  678.  
  679. #pragma linkage(RexxSetHalt,system)
  680. APIRET APIENTRY RexxSetHalt(
  681.          PID,                         /* Process Id                  */
  682.          TID);                        /* Thread Id                   */
  683.  
  684. /***   Uppercase Entry Point Name */
  685. #define REXXSETHALT  RexxSetHalt
  686.  
  687.  
  688. /***    RexxSetTrace - Request Program Trace */
  689.  
  690. #pragma linkage(RexxSetTrace,system)
  691. APIRET APIENTRY RexxSetTrace(
  692.          PID,                         /* Process Id                  */
  693.          TID);                        /* Thread Id                   */
  694.  
  695. /***   Uppercase Entry Point Name */
  696. #define REXXSETTRACE  RexxSetTrace
  697.  
  698.  
  699. /***    RexxResetTrace - Turn Off Program Trace */
  700.  
  701. #pragma linkage(RexxResetTrace,system)
  702. APIRET APIENTRY RexxResetTrace(
  703.          PID,                         /* Process Id                  */
  704.          TID);                        /* Thread Id                   */
  705.  
  706. /***   Uppercase Entry Point Name */
  707. #define REXXRESETTRACE  RexxResetTrace
  708.  
  709. /* XLATON */
  710.  
  711.  
  712. #endif /* INCL_RXARI */
  713.  
  714.  
  715. /***    Macro Space Interface */
  716. #ifdef INCL_RXMACRO
  717.  
  718. /* XLATOFF */
  719.  
  720. /***    RexxAddMacro - Register a function in the Macro Space        */
  721.  
  722. #pragma linkage(RexxAddMacro,system)
  723. APIRET APIENTRY RexxAddMacro (
  724.          PSZ,                         /* Function to add or change   */
  725.          PSZ,                         /* Name of file to get function*/
  726.          ULONG  );                    /* Flag indicating search pos  */
  727.  
  728. /***   Uppercase Entry Point Name */
  729. #define REXXADDMACRO  RexxAddMacro
  730.  
  731.  
  732.  
  733. /***    RexxDropMacro - Remove a function from the Macro Space       */
  734.  
  735. #pragma linkage(RexxDropMacro,system)
  736. APIRET APIENTRY RexxDropMacro (
  737.          PSZ );                        /* Name of function to remove */
  738.  
  739. /***   Uppercase Entry Point Name */
  740. #define REXXDROPMACRO  RexxDropMacro
  741.  
  742.  
  743.  
  744. /***    RexxSaveMacroSpace - Save Macro Space functions to a file    */
  745.  
  746. #pragma linkage(RexxSaveMacroSpace,system)
  747. APIRET APIENTRY RexxSaveMacroSpace (
  748.          ULONG ,                      /* Argument count (0==save all)*/
  749.          PSZ *,                       /* List of funct names to save */
  750.          PSZ);                        /* File to save functions in   */
  751.  
  752. /***   Uppercase Entry Point Name */
  753. #define REXXSAVEMACROSPACE  RexxSaveMacroSpace
  754.  
  755.  
  756.  
  757. /***    RexxLoadMacroSpace - Load Macro Space functions from a file  */
  758.  
  759. #pragma linkage(RexxLoadMacroSpace,system)
  760. APIRET APIENTRY RexxLoadMacroSpace (
  761.          ULONG ,                      /* Argument count (0==load all)*/
  762.          PSZ *,                       /* List of funct names to load */
  763.          PSZ);                        /* File to load functions from */
  764.  
  765. /***   Uppercase Entry Point Name */
  766. #define REXXLOADMACROSPACE  RexxLoadMacroSpace
  767.  
  768.  
  769.  
  770. /***    RexxQueryMacro - Find a function's search-order position     */
  771.  
  772. #pragma linkage(RexxQueryMacro,system)
  773. APIRET APIENTRY RexxQueryMacro (
  774.          PSZ,                         /* Function to search for      */
  775.          PUSHORT );                   /* Ptr for position flag return*/
  776.  
  777. /***   Uppercase Entry Point Name */
  778. #define REXXQUERYMACRO  RexxQueryMacro
  779.  
  780.  
  781.  
  782. /***    RexxReorderMacro - Change a function's search-order          */
  783. /***                            position                             */
  784.  
  785. #pragma linkage(RexxReorderMacro,system)
  786. APIRET APIENTRY RexxReorderMacro(
  787.          PSZ,                         /* Name of funct change order  */
  788.          ULONG  );                    /* New position for function   */
  789.  
  790. /***   Uppercase Entry Point Name */
  791. #define REXXREORDERMACRO  RexxReorderMacro
  792.  
  793.  
  794.  
  795. /***    RexxClearMacroSpace - Remove all functions from a MacroSpace */
  796.  
  797.  
  798. #pragma linkage(RexxClearMacroSpace,system)
  799. APIRET APIENTRY RexxClearMacroSpace(
  800.          VOID );                      /* No Arguments.               */
  801.  
  802. /***   Uppercase Entry Point Name */
  803. #define REXXCLEARMACROSPACE  RexxClearMacroSpace
  804.  
  805. /* XLATON */
  806.  
  807. #endif /* INCL_RXMACRO */
  808.  
  809. #endif /* REXXSAA_INCLUDED */
  810.